package de.yvert.jingle.impl.openexr;

import java.io.IOException;

public class TileDescAttribute extends Attribute
{

public static final String TYPE = "tiledesc";
public static final int SIZE = 9;

private final int xSize, ySize;
private final byte mode;

public TileDescAttribute(String name, int xSize, int ySize, byte mode)
{
	super(name);
	this.xSize = xSize;
	this.ySize = ySize;
	this.mode = mode;
}

@Override
public String toString()
{ return TYPE+" \""+getName()+"\" = "+xSize+" "+ySize+" "+mode; }

@Override
public void write(ExrOutputStream out) throws IOException
{
	out.writeString(getName());
	out.writeString(TYPE);
	out.writeInt(SIZE);
	out.writeInt(xSize);
	out.writeInt(ySize);
	out.writeByte(mode);
}

}
